package com.lmscn.lms.api.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

/**
 * 滚动类别表
 * 
 * @author zhang.xx
 * @date 2016年11月12日10:16:10
 * 
 */
public class CategoryColum extends Model<CategoryColum> {

	public static final CategoryColum dao = new CategoryColum();

	/**
	 * 获取列表
	 * 
	 * @return
	 */
	public List<CategoryColum> getCategoryColums() {
		String sql = "SELECT * FROM t_category_column ORDER BY seq";
		return dao.find(sql);
	}
	
	public CategoryColum getCategoryColumByName(String name) {
		String sql = "SELECT * FROM t_category_column t WHERE t.name = ? ";
		return dao.findFirst(sql, name);
	}

}
